home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 16
/
Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso
/
Aminet
/
comm
/
term
/
term_source.lha
/
Extras
/
Source
/
gtlayout-source.lha
/
LTP_DrawBackFore.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-03-18
|
963b
|
50 lines
/*
** GadTools layout toolkit
**
** Copyright © 1993-1996 by Olaf `Olsen' Barthel
** Freely distributable.
**
** :ts=4
*/
#ifndef _GTLAYOUT_GLOBAL_H
#include "gtlayout_global.h"
#endif
#ifdef DO_TAPEDECK_KIND
VOID
LTP_DrawBackFore(struct RastPort *RPort,BOOL Back,LONG Left,LONG Top,LONG Width,LONG Height)
{
LONG i,Len,Start,ArrowWidth,ArrowHeight,Shift,x1,x2;
ArrowWidth = Width / 2;
ArrowHeight = Height;
Left = Left + (Width - ArrowWidth) / 2;
Shift = ArrowWidth / 2;
for(i = 0 ; i < ArrowWidth ; i++)
{
Len = ((ArrowHeight * (i + 1)) / ArrowWidth) & ~1;
if(Len < ArrowHeight)
Len++;
Start = Top + (ArrowHeight - Len) / 2;
if(Back)
{
x1 = Left + i - Shift;
x2 = Left + i + Shift;
}
else
{
x1 = Left + ArrowWidth - 1 - i - Shift;
x2 = Left + ArrowWidth - 1 - i + Shift;
}
LTP_DrawLine(RPort,x1,Start,x1,Start + Len - 1);
LTP_DrawLine(RPort,x2,Start,x2,Start + Len - 1);
}
}
#endif /* DO_TAPEDECK_KIND */